cmake_minimum_required(VERSION 3.1)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_PREFIX_PATH /opt/Qt/6.3.2/gcc_64 /opt/paddlepaddle/fastdeploy)
set(EXE main)
project(${EXE})

aux_source_directory(qt_src SRC)
aux_source_directory(src SRC)
aux_source_directory(qt_src SRC)

FILE(GLOB UI "ui/*.ui")
FILE(GLOB INC "include/*.h")
FILE(GLOB QT_INC "qt_include/*.h")
list(APPEND CMAKE_AUTOUIC_SEARCH_PATHS "ui")
add_executable(${EXE} ${SRC} ${QT_INC} ${INC} ${UI})

find_package(Qt6 REQUIRED COMPONENTS Widgets)
find_package(OpenCV 4 REQUIRED)
find_package(FastDeploy REQUIRED)

target_include_directories(${EXE} PUBLIC
                                         ${FASTDEPLOY_INCS} include qt_include)

target_link_directories(${EXE} PUBLIC /usr/lib/seetaface6)
target_link_libraries(
  ${EXE}
  PUBLIC Qt6::Widgets
         ${OpenCV_LIBS}
         ${FASTDEPLOY_LIBS}
         SeetaAgePredictor600
         SeetaAuthorize
         SeetaEyeStateDetector200
         SeetaFaceAntiSpoofingX600
         SeetaFaceDetector600
         SeetaFaceLandmarker600
         SeetaFaceRecognizer610
         SeetaFaceTracking600
         SeetaGenderPredictor600
         SeetaPoseEstimation600
         SeetaQualityAssessor300
         tennis_haswell
         tennis_pentium
         tennis_sandy_bridge
         tennis)
